package io.renren.modules.canteens.dao;

import io.renren.common.dao.BaseDao;
import io.renren.modules.canteens.dto.FoodDTO;
import io.renren.modules.canteens.entity.FoodEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 食材表（辅材共用）
 *
 * @author 翟文闯 619556390@QQ.com
 * @since 1.0.0 2019-11-22
 */
@Mapper
public interface FoodDao extends BaseDao<FoodEntity> {


    @Select("SELECT * from canteens_food where  food_name = '${name}' ")
    FoodDTO getName(String name);

    @Select("SELECT * from canteens_food where  food_name like '%${name}%' ")
    List<FoodDTO> getLikeName(String name);
}